package com.qlc.spring.cloud.demo.user.http;

import com.qlc.spring.cloud.demo.Result;
import com.qlc.spring.cloud.demo.user.VO.UserVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * Name:  UserHttpService
 * User:  wang chang
 * CreateTime: 2019-05-29 10:05
 **/
//@FeignClient(value = "QLC-SPRING-CLOUD-DEMO-PROVIDER-USER")
@FeignClient(value = "QLC-SPRING-CLOUD-DEMO-PROVIDER-USER", fallbackFactory = UserHttpServiceFallBack.class)
public interface UserHttpService {

    @RequestMapping(value = "/test/net/{userCode}", method = {RequestMethod.GET})
    Result<UserVO> getUserByCode(@PathVariable("userCode") String userCode);


    @RequestMapping(value = "/test/add")
    Result<Void> addUser(@RequestBody(required = false) UserVO userVO);
}
